package com.xingxue.entity;

import java.io.Serializable;
import java.util.Date;

import org.yihang.annotation.DeleteBy;
import org.yihang.annotation.FindBy;
import org.yihang.annotation.FindByVo;
import org.yihang.annotation.VoType;
import org.yihang.annotation.easyui.*;

@SuppressWarnings("serial")
@LocalSource(kvvar = "ProductVirtualFlg",var="ProductVirtualFlgSource", kv = {@KV(text="是",value="true"),@KV(text="否",value="false")})
@LocalSource(kvvar = "ProductSellFlg", var="ProductSellFlgSource", kv = {@KV(text="上架",value="true"),@KV(text="下架",value="false")})
@RemoteSource(var="CategoryAllKVSource", value="/category/findAllKV")
@RemoteSource(var="CategoryAllSource", value="/category/findAll")
public class Product implements Serializable {
	@FindBy @DeleteBy(withMulti = true)
	@DatagridColumn(align="center", title="编号", width=80)
	private long id;
	@FindByVo(voType = VoType.like)
	@Search(label = "名称")
	@DatagridColumn(align="center", title="名称", width=80)
	private String name;

	@DatagridColumn(align="center", title="虚拟商品", width=80, formatter = @Formatter(type=FormatterType.SOURCE,value="ProductVirtualFlgSource"))
	private boolean virtualFlg;

	@DatagridColumn(align="center", title="上下架", width=80, formatter = @Formatter(type= FormatterType.SOURCE,value="ProductSellFlgSource"))
	private boolean saleFlg;
	@DatagridColumn(align="center", title="支付类型", width=80)
	private int payType;
	private String pics;
	private String productDesc;
	private String productDetail;
	private int freightFee;
	private String extendFields;
	@DatagridColumn(align="center", title="创建时间", width=80,formatter = @Formatter(type=FormatterType.DATE,value="yyyy-MM-dd"))
//	@FindByVo(voType=VoType.between)
	@Search(label = "日期", type=SearchType.BetweenDate)
	private Date createTime;
	private Date updateTime;
	@FindBy
	@FindByVo(voType = VoType.in)
	@Search(label = "类别", type=SearchType.ComboMulti, source="CategoryAllSource")
	@DatagridColumn(align="center", title="类别", width=80, formatter = @Formatter(type=FormatterType.SOURCE,value="CategoryAllKVSource"))
	private int categoryId;
	private int storeId;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isVirtualFlg() {
		return virtualFlg;
	}

	public void setVirtualFlg(boolean virtualFlg) {
		this.virtualFlg = virtualFlg;
	}

	public boolean isSaleFlg() {
		return saleFlg;
	}

	public void setSaleFlg(boolean saleFlg) {
		this.saleFlg = saleFlg;
	}

	public int getPayType() {
		return payType;
	}

	public void setPayType(int payType) {
		this.payType = payType;
	}

	public String getPics() {
		return pics;
	}

	public void setPics(String pics) {
		this.pics = pics;
	}

	public String getProductDesc() {
		return productDesc;
	}

	public void setProductDesc(String productDesc) {
		this.productDesc = productDesc;
	}

	public String getProductDetail() {
		return productDetail;
	}

	public void setProductDetail(String productDetail) {
		this.productDetail = productDetail;
	}

	public int getFreightFee() {
		return freightFee;
	}

	public void setFreightFee(int feightFee) {
		this.freightFee = feightFee;
	}

	public String getExtendFields() {
		return extendFields;
	}

	public void setExtendFields(String extendFields) {
		this.extendFields = extendFields;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public int getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(int categoryId) {
		this.categoryId = categoryId;
	}

	public int getStoreId() {
		return storeId;
	}

	public void setStoreId(int storeId) {
		this.storeId = storeId;
	}

}
